package dao;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import pojo.OrderItem;

import java.util.List;

public interface OrderItemMapper {
    @ResultMap("orderItemResultMap")
    List<OrderItem> selectAll(@Param("orderId") String orderId);

    int insertOrderItem(@Param("id") long id,@Param("orderId") long orderId,@Param("bookId") long bookId,@Param("number") int number,@Param("bookName") String bookName,@Param("price") double price);
    long validateOrderItemId(@Param("id") long id);

    int adminUpdateOrder(@Param("id") String id ,@Param("status") String status);

    int adminDeleteOrder(@Param("id") String id);
}
